<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%
    String path = request.getContextPath();
%>

<!DOCTYPE>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <!-- Viewport metatags -->
    <meta name="HandheldFriendly" content="true"/>
    <meta name="MobileOptimized" content="320"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <link rel="stylesheet" type="text/css" href="<%=path%>/css/dandelion.css" media="screen"/>
    <link rel="stylesheet" href="<%=path%>/plugins/layui/css/layui.css?version=1"/>
    <title>${httpStatus}错误</title>
</head>

<body>
<!-- Main Wrapper. Set this to 'fixed' for fixed layout and 'fluid' for fluid layout' -->
<div id="da-wrapper" class="fluid">

    <!-- Content -->
    <div id="da-content">

        <!-- Container -->
        <div class="da-container clearfix">

            <div id="da-error-wrapper">

                <div id="da-error-pin"></div>
                <div id="da-error-code">
                    error <span>${httpStatus}</span>
                </div>
                <h1 class="da-error-heading">${content}</h1>
                <br>
                <p>
                    <button name="cat-error-info" id="cat-error-info" onclick="catErrorInfo()"
                            class="layui-btn layui-btn-mini layui-btn-normal">点击查看错误信息
                    </button>
                </p>
                <br>
                <br>
                <p id="error-text" name="error-text"></p>
            </div>
        </div>
    </div>
</div>
</body>
<script src="<%=path %>/plugins/jquery.min.js" type="text/javascript"></script>
<SCRIPT language="javascript">
    var isErrorInfo = false;
    function catErrorInfo() {
        if (isErrorInfo) {
            isErrorInfo = false;
            $('#error-text').empty();
        } else {
            isErrorInfo = true;
            $('#error-text').append(
                '<font  face="黑体" color="red">' + '${errorInfo}' + '</font>'
            );
        }
    }
</SCRIPT>

</html>
